import SilverBullet from "./SilverBullet.js";
const _bulletsPool = new Array();
const _enemyPool = [];
const Pool = {
    generateBullet() {
        let bullet = null;
        if (_bulletsPool.length === 0) {
            bullet = new SilverBullet(0, 0);
        }
        else {
            bullet = _bulletsPool.shift();
        }
        return bullet;
    },
    recycleBullet(bullet) {
        _bulletsPool.push(bullet);
    }
};
// setInterval(()=>{
//   console.clear()
//   console.table(_bulletsPool)
// },1000)
export default Pool;
